fix(spreadsheet): enable multiple optional loading parameters#3835
Conversation
Signed-off-by: Joris Mancini <joris.mancini_externe@rte-france.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA conditional chain in a useEffect hook is refactored from mutually exclusive Changes
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
dbraquart
left a comment
There was a problem hiding this comment.
code: ok
- maybe we could refactor to call the 2 setState() a single "batched" time rather than N times
tests: ok
- the fix also works when we unselect several options
It's batched by react, so we keep as is to be sure to not introduce regressions |



PR Summary
If we modify several loading options at the same time only one is taken into account for reloading related spreadsheet which is not the expected behavior.
For example, if you load lines and generators spreadsheets, if then we toggle on "inactive limit sets" on lines and "regulated terminals" on generators, we expect both types to be completely reloaded to add these data. But for now, if you do that, only the lines will be reloaded. So, this fix enables to reload both lines and generators in this situation.